package com.citytransport.prokopjuk.builder_strategy;

import com.citytransport.prokopjuk.route.Route;


/**
 *Class Director create and return object of Route. Part of pattern Builder.
 */
public class Director {
	private AbstractRouteBuilder builder;

	/** No-arg constructor */
	public Director() {
		
	}

	/**
	 * Setter for attribute builder.
	 * 
	 * @param builder - new value of builder.
	 * */
	public void setRouteBuilder(AbstractRouteBuilder builder) {
		this.builder =  builder;
	}

	/**
	 * Getter for attribute builder.
	 * 
	 * @return builder - attribute builder.
	 * */
	public Route getRoute() {
		return builder.getRoute();
	}

	/**
	 * The main method that create and configure builder.
	 * */
	public void createRoute() {
		builder.createRoute();		
		builder.setIntervalMinute();
		builder.setRouteID();
		builder.setVehicleOnRoute();
		builder.setPrice();
		builder.setStations();
	}

}
